import Vue from 'vue'
import VueRouter  from 'vue-router'
// 引入各个组件
import Home from '@/components/Home.vue'
import About from '@/components/About.vue'

Vue.use(VueRouter)

// 创建并暴露一个路由器
export default new VueRouter({
  mode:'history',
  routes:[
    {path:'/home',component:Home},
    {path:'/about',component:About}
  ]
})
